<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/course/index.css?v=1.2.1">
<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/course/newCourse.css?v=1.1">
<?php
$cate    = \Yii::$app->request->get('cate', 0);
$subject = \Yii::$app->request->get('subject', 0);
$score   = \Yii::$app->request->get('score', 0);
?>


<section id="app">
    <!--侧边栏-->
    <!--    <div class="SidebarRight">-->
    <!--        <a href="" style="margin-top: 20px;"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/index/54.png" alt=""><p>客服</p></a>-->
    <!--        <a href="">-->
    <!--            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/course/75(1).png" alt="">-->
    <!--            <p>关注微信</p>-->
    <!--            <div class="leftCode">-->
    <!--                <img src="/app/web_core/styles/images/lindy-wechat.jpg" alt="二维码图片">-->
    <!--            </div>-->
    <!--        </a>-->
    <!--        <a href="">-->
    <!--            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/course/76(1).png" alt="">-->
    <!--            <p>下载app</p>-->
    <!--            <div class="leftCode">-->
    <!--                <img src="/app/web_core/styles/images/lindy-wechat.jpg" alt="二维码图片">-->
    <!--            </div>-->
    <!--        </a>-->
    <!--        <div  class="backTop" @click="backtop()">-->
    <!--            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/index/52.png" alt="">-->
    <!--        </div>-->
    <!--    </div>-->
    <div class="banner mallBanner">
    </div>
    <!--
    <div class="filterType">
        <div class="filterContent">
            <div class="singleType">
                <p>雅思单项:</p>
                <a href="/mall/<?php echo $cate ?>/1/<?php echo $score ?>/1.html" <?php echo $subject == 1 ? 'class="on"' : '' ?>>听力</a>
                <a href="/mall/<?php echo $cate ?>/2/<?php echo $score ?>/1.html" <?php echo $subject == 2 ? 'class="on"' : '' ?>>口语</a>
                <a href="/mall/<?php echo $cate ?>/3/<?php echo $score ?>/1.html" <?php echo $subject == 3 ? 'class="on"' : '' ?>>阅读</a>
                <a href="/mall/<?php echo $cate ?>/4/<?php echo $score ?>/1.html" <?php echo $subject == 4 ? 'class="on"' : '' ?>>写作</a>
                <a href="/mall/<?php echo $cate ?>/0/<?php echo $score ?>/1.html" <?php echo $subject == 0 ? 'class="on"' : '' ?>>全部</a>
            </div>
            <div class="singleType">
                <p>课程类型:</p>
                <a href="/mall/4/<?php echo $subject ?>/<?php echo $score ?>/1.html" <?php echo $cate == 4 ? 'class="on"' : '' ?>>录播课</a>
                <a href="/mall/2/<?php echo $subject ?>/<?php echo $score ?>/1.html" <?php echo $cate == 2 ? 'class="on"' : '' ?>>小班课</a>
                <a href="/mall/6/<?php echo $subject ?>/<?php echo $score ?>/1.html" <?php echo $cate == 6 ? 'class="on"' : '' ?>>1对1</a>
                <a href="/mall/3/<?php echo $subject ?>/<?php echo $score ?>/1.html" <?php echo $cate == 3 ? 'class="on"' : '' ?>>单项课</a>
                <a href="/mall/0/<?php echo $subject ?>/<?php echo $score ?>/1.html" <?php echo $cate == 0 ? 'class="on"' : '' ?>>全部</a>
            </div>
            <div class="singleType">
                <p>目标分:</p>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/1/1.html" <?php echo $score == 1 ? 'class="on"' : '' ?>>5.0</a>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/2/1.html" <?php echo $score == 2 ? 'class="on"' : '' ?>>5.5</a>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/3/1.html" <?php echo $score == 3 ? 'class="on"' : '' ?>>6.0</a>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/4/1.html" <?php echo $score == 4 ? 'class="on"' : '' ?>>6.5</a>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/5/1.html" <?php echo $score == 5 ? 'class="on"' : '' ?>>7分以上</a>
                <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/0/1.html" <?php echo $score == 0 ? 'class="on"' : '' ?>>全部</a>
            </div>
        </div>
    </div> -->
    <div class="courseContent">
        <div class="courseCover">
            <!--热门课-->
            <div class="courseModel">
                <p class="modelTitle"><span>热门课程</span>
                </p>
                <div class="courseItemCover">
                    <?php foreach ($class[8] as $v) { ?>
                        <div class="courseItem">
                            <a onclick="_czc.push(['_trackEvent','首页-顶部导航-课程中心-选课中心-热门课程','查看详情','雅思优选全程班',''])" href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank" >
                                <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                <div class="courseItemMain">
                                    <div>
                                        <p class="courseName"><?php echo $v['name'] ?></p>
                                        <p class="suit"><?php echo $v['student'] ?></p>
                                        <p class="suit"><?php echo $v['classTime'] ?></p>
                                    </div>

                                    <div class="courseBtn">
                                        <button> 查看详情</button>
                                    </div>
                                </div>
                            </a>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <div class="courseModel">
                <p class="modelTitle"><span>直播班课</span>
                </p>
                <div class="courseItemCover">
                    <?php foreach ($class[5] as $v) { ?>
                        <div class="courseItem">
                            <a onclick="_czc.push(['_trackEvent','首页-顶部导航-课程中心-选课中心-直播班课','查看详情','<?php echo $v['name'] ?>',''])" href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                <div class="courseItemMain">
                                    <div>

                                        <p class="courseName"><?php echo $v['name'] ?></p>
                                        <p class="suit"><?php echo $v['student'] ?></p>
                                        <p class="suit"><?php echo $v['classTime'] ?></p>
                                    </div>

                                    <div class="courseBtn">
                                        <button> 查看详情</button>
                                    </div>
                                </div>
                            </a>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <div class="courseModel">
                <p class="modelTitle"><span>面授课</span>
                </p>
                <div class="courseItemCover">
                    <?php foreach ($class[7] as $v) { ?>
                        <div class="courseItem">
                            <a onclick="_czc.push(['_trackEvent','首页-顶部导航-课程中心-选课中心-面授课','查看详情','<?php echo $v['name'] ?>',''])"  href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                <div class="courseItemMain">
                                    <div>

                                        <p class="courseName"><?php echo $v['name'] ?></p>
                                        <p class="suit"><?php echo $v['student'] ?></p>
                                        <p class="suit"><?php echo $v['classTime'] ?></p>
                                    </div>

                                    <div class="courseBtn">
                                        <button> 查看详情</button>
                                    </div>
                                </div>
                            </a>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <!--   VIP一对一   -->
            <div class="courseModel">
                <p class="modelTitle"><span>直播一对一</span></p>
                <div class="courseItemCover">
                    <?php foreach ($class[6] as $v) { ?>
                        <div class="courseItem">
                            <a onclick="_czc.push(['_trackEvent','首页-顶部导航-课程中心-选课中心-VIP一对一','查看详情','<?php echo $v['name'] ?>',''])" href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                <div class="courseItemMain">
                                    <div>

                                        <p class="courseName"><?php echo $v['name'] ?></p>
                                        <p class="suit"><?php echo $v['student'] ?></p>
                                        <p class="suit"><?php echo $v['classTime'] ?></p>
                                    </div>

                                    <div class="courseBtn">
                                        <button> 查看详情</button>
                                        <!--                                        <a href="/login.html?source=10&url=http://-->
                                        <?php //echo $_SERVER['SERVER_NAME'] . Yii::$app->request->getUrl() ?><!--"-->
                                        <!--                                           class="buyBtn">购买 ></a>-->
                                    </div>
                                </div>
                            </a>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <!--   录播课   -->
            <div class="courseModel">
                <p class="modelTitle"><span>录播课</span></p>
                <div class="courseItemCover">
                    <?php foreach ($class[4] as $v) { ?>
                        <div class="courseItem">
                            <a onclick="_czc.push(['_trackEvent','首页-顶部导航-课程中心-选课中心-录播课','查看详情','<?php echo $v['name'] ?>',''])" href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                <div class="courseItemMain">
                                    <div>

                                        <p class="courseName"><?php echo $v['name'] ?></p>
                                        <p class="suit"><?php echo $v['student'] ?></p>
                                        <p class="suit"><?php echo $v['classTime'] ?></p>
                                    </div>

                                    <div class="courseBtn">
                                        <button> 查看详情</button>
                                        <!--                                        <a href="/login.html?source=10&url=http://-->
                                        <?php //echo $_SERVER['SERVER_NAME'] . Yii::$app->request->getUrl() ?><!--"-->
                                        <!--                                           class="buyBtn">购买 ></a>-->
                                    </div>
                                </div>
                            </a>
                        </div>
                    <?php } ?>
                </div>
            </div>


            <!--   公开课   -->
            <?php if ($cate != false || $subject != false || $score != false) { ?>
                <div class="courseModel">
                    <!--                    <p class="modelTitle"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/course/73.png" alt=""><span>公开课</span></p>-->
                    <div class="courseItemCover">
                        <?php foreach ($class[0] as $v) { ?>
                            <div class="courseItem">
                                <a href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                    <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                    <div class="courseItemMain">
                                        <div>

                                            <p class="courseName"><?php echo $v['name'] ?></p>
                                            <p class="suit"><?php echo $v['student'] ?></p>
                                            <p class="suit"><?php echo $v['classTime'] ?></p>
                                        </div>

                                        <div class="courseBtn">
                                            <button> 查看详情</button>
                                            <!--                                        <a href="/login.html?source=10&url=http://-->
                                            <?php //echo $_SERVER['SERVER_NAME'] . Yii::$app->request->getUrl() ?><!--"-->
                                            <!--                                           class="buyBtn">购买 ></a>-->
                                        </div>
                                    </div>
                                </a>
                            </div>
                        <?php } ?>
                    </div>
                </div>
                <!--   分页   -->
                <div class="pageCover">
                    <?php $pageCount = ceil($count / 12); ?>
                    <?php for ($i = 1; $i < $pageCount; $i++) { ?>
                        <a href="/mall/<?php echo $cate ?>/<?php echo $subject ?>/<?php echo $score ?>/<?php echo $i ?>"
                           class="on"><?php echo $i ?></a>
                    <?php } ?>
                    <!--                    <a href="">2</a>-->
                </div>
            <?php } else { ?>

                <!--   特色课程   -->

                <div class="courseModel" style="display: none">
                    <p class="modelTitle"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/course/zhibo.png"
                                               alt=""><span>小班课</span></p>
                    <div class="courseItemCover">
                        <?php foreach ($class[2] as $v) { ?>
                            <div class="courseItem">
                                <a href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                    <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                    <div class="courseItemMain">
                                        <div>

                                            <p class="courseName"><?php echo $v['name'] ?></p>
                                            <p class="suit"><?php echo $v['student'] ?></p>
                                            <p class="suit"><?php echo $v['classTime'] ?></p>
                                        </div>

                                        <div class="courseBtn">
                                            <button> 查看详情</button>
                                            <!--                                        <a href="/login.html?source=10&url=http://-->
                                            <?php //echo $_SERVER['SERVER_NAME'] . Yii::$app->request->getUrl() ?><!--"-->
                                            <!--                                           class="buyBtn">购买 ></a>-->
                                        </div>
                                    </div>
                                </a>
                            </div>
                        <?php } ?>
                    </div>
                </div>

                <div class="courseModel" style="display: none">
                    <p class="modelTitle"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/course/76.png"
                                               alt=""><span>单项课</span></p>
                    <div class="courseItemCover">
                        <?php foreach ($class[3] as $v) { ?>
                            <div class="courseItem">
                                <a href="/course-detail/<?php echo $v['id'] ?>.html" target="_blank">
                                    <img src="<?php echo $v['pic'] ?>" alt="" class="courseImg">
                                    <div class="courseItemMain">
                                        <div>

                                            <p class="courseName"><?php echo $v['name'] ?></p>
                                            <p class="suit"><?php echo $v['student'] ?></p>
                                            <p class="suit"><?php echo $v['classTime'] ?></p>
                                        </div>
                                        <div class="courseBtn">
                                            <button> 查看详情</button>
                                            <!--                                        <a href="/login.html?source=10&url=http://-->
                                            <?php //echo $_SERVER['SERVER_NAME'] . Yii::$app->request->getUrl() ?><!--"-->
                                            <!--                                           class="buyBtn">购买 ></a>-->
                                        </div>
                                    </div>
                                </a>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            <?php } ?>
        </div>
    </div>
</section>
<script src="https://file.viplgw.cn/ui/thinku-ielts-new/js/courseIndex.js?v=1.1"></script>
<script>
    let time = 0;
    let timer = ''
    $(function (){
        timer = setInterval(function (){
            time ++
        },1000)
    })
    window.onbeforeunload  = function (e) {
        e = e || window.event;
        clearInterval(timer);
        console.log(time)
        _czc.push(['_trackEvent','课程中心','选课中心','',time])
    };
</script>
